<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/24/024
 * Time: 20:12
 */

namespace app\admin\validate;

class TurntableRecordValidate extends \think\Validate
{

    const SCENE_ADD = 'add'; //添加权限
    const SCENE_REMOVE = 'remove'; //删除权限
    const SCENE_MODIFY = 'modify'; //修改权限



    protected $rule = [
        'id' => 'require|number',
        'title' => 'require|max:32',
        'gold' => 'require|number',
        'probability' => 'require|number',
    ];


    protected $message  = [
        'id.require' => 'ID必须',
        'id.number' => 'ID必须为数字',
        'gold.require' => '金币必须',
        'gold.number' => '金币必须数字',        
        'probability.require' => '概率必须',
        'probability.number' => '概率必须数字',
        'title.require' => '标题必须',
        'title.max' => '标题不能超过32个字符',

    ];

    protected $scene  = [
       self::SCENE_ADD => ['name','pid', 'sys_id', 'model_id'],
       self::SCENE_MODIFY => ['id', 'name','pid', 'sys_id', 'model_id'],
       self::SCENE_REMOVE => ['id'],
    ];
    


}